import request from '@/utils/request'

// 查询入库任务列表
export function listRukumain(query) {
  return request({
    url: '/business/rukumain/list',
    method: 'get',
    params: query
  })
}

// 查询入库任务详细
export function getRukumain(id) {
  return request({
    url: '/business/rukumain/' + id,
    method: 'get'
  })
}
export function getRukumainByRukuFlag(rukuFlag) {
  return request({
    url: '/business/rukumain/getRukumainByRukuFlag/' + rukuFlag,
    method: 'get'
  })
}

// 新增入库任务
export function addRukumain(data) {
  return request({
    url: '/business/rukumain',
    method: 'post',
    data: data
  })
}

// 修改入库任务
export function updateRukumain(data) {
  return request({
    url: '/business/rukumain',
    method: 'put',
    data: data
  })
}
//执行入库
export function zhixingRuku(danhao) {
  return request({
    url: '/business/rukumain/zhixingRuku/' + danhao,
    method: 'get'
  })
}
// 删除入库任务
export function delRukumain(danhao) {
  return request({
    url: '/business/rukumain/' + danhao,
    method: 'delete'
  })
}
